/*
Copyright (C) 2022-2024 Inspur Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/
package wsreg

import (
	"did-service/controller"

	"github.com/emicklei/go-restful"
)

func RegisterIdentityHubWebService(ws *restful.WebService, controller *controller.DidController) {
	ws.Route(ws.POST("/v1/did/grant").To(controller.CredentialGrantCreate))
	ws.Route(ws.POST("/v1/did/grant/verify").To(controller.CredentialGrantVerify))
	ws.Route(ws.POST("/v1/did/grant/revoke").To(controller.CredentialGrantRevoke))
	ws.Route(ws.GET("/v1/credential/grantee/page").To(controller.ListCredentialToMePage))
	ws.Route(ws.GET("/v1/credential/grant/page").To(controller.ListCredentialToOtherPage))
}
